<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ include file="/user/common.jsp"%>
<%@ page import="com.bci.pwtz.common.util.SpringUtil" %>
<%@ page import="com.bci.pwtz.common.util.PwtzUtils" %>
<%@ page import="com.bci.pwtz.mysql.model.Zyxl" %>
<%@ page import="com.bci.pwtz.service.ZyxlService" %>
<%@ page import="com.bci.pwtz.mysql.model.Bdz" %>
<%@ page import="com.bci.pwtz.service.BdzService" %>
<%
Long companyId=null;
if(user!=null){
    companyId=user.getLastCompanyId();
}
String deviceid=request.getParameter("deviceid");
ZyxlService service=(ZyxlService)SpringUtil.getBean("zyxlService");
Zyxl device=service.load(deviceid);
BdzService bdzService=(BdzService)SpringUtil.getBean("bdzService");
Bdz predevice=bdzService.load(device.getStartsubstationcode());
String predeviceid="";
String predevicename="";
if(predevice!=null){
    predeviceid=predevice.getDeviceid();
    predevicename=predevice.getDevicename();
}
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>配网数据-中压线路</title>
<link href="<%=basePath %>user/css/style.css" rel="stylesheet" type="text/css" />
<link href="<%=basePath %>user/css/llcss.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="<%=basePath %>js/jquery/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=basePath %>js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=basePath %>user/js/hd_ll.js"></script>
<script type="text/javascript" src="<%=basePath %>user/js/common.js"></script>
<script type="text/javascript" src="<%=basePath %>js/ajaxfileupload.js"></script>
<script type="text/javascript" src="<%=basePath %>js/toolutils.js"></script>
<script type="text/javascript">
var companyId=<%=companyId%>;
var deviceid='<%=predeviceid%>';
</script>
<script type="text/javascript" src="<%=basePath %>user/z/js/zyxladd.js"></script>
<script type="text/javascript">
function selectLoad(){
	setDefault('operationstate','<%=device.getOperationstate()%>');
	setDefault('isruralpowernetwork','<%=device.getIsruralpowernetwork()%>');
	setDefault('isgenerationdimension','<%=device.getIsgenerationdimension()%>');
	setDefault('importantdegree','<%=device.getImportantdegree()%>');
	setDefault('equipmentstate','<%=device.getEquipmentstate()%>');
	setDefault('assetsnature','<%=device.getAssetsnature()%>');
	setDefault('startdevicetype','<%=device.getStartdevicetype()%>');
	setDefault('erectmode','<%=device.getErectmode()%>');
	setDefault('devicetype','<%=device.getDevicetype()%>');
	xlStart();
	setDefault('voltagelevel','<%=device.getVoltagelevel()%>');
	setDefault('overheadlinklinemode','<%=device.getOverheadlinklinemode()%>');
	setDefault('cablelinklinemode','<%=device.getCablelinklinemode()%>');
	setDefault('regionalcharacteristics','<%=device.getRegionalcharacteristics()%>');
	setDefault('dispatchtype','<%=device.getDispatchtype()%>');
	setDefault('equipmentadded','<%=device.getEquipmentadded()%>');
	setTimeout(function(){
		setDefault('mainlinecode','<%=device.getMainlinecode()%>');
	},100);
	setTimeout(function(){
		setDefault('prelinecode','<%=device.getPrelinecode()%>');
	},200);
}
</script>
</head>
<body bgcolor="white" onload="selectLoad()">
	<%@ include file="/user/head.jsp"%>
	<!-- main_begin -->
	<div class="pwsj_cont_box">
	<%@ include file="/user/left.jsp"%>
	<!-- 右侧内容_begin -->
	<%if(device!=null) {%>
	<form id="form">
		<div class="pwsj_cont_right_box" scroll="no">
		<!-- 柱上变压器_begin -->
		<div class="pwsj_right_byq" scroll="no">
			<div class="pwsj_right_byq_position" style="margin-bottom:3px;">
				<a href="<%=basePath %>user/m/index.jsp" class="position">配网数据</a>&gt;
				<a href="<%=basePath %>user/z/bdzlist.jsp" class="position">变电站</a>&gt;
				<a  class="position">修改中压线路</a>
				<a class="right" href="<%=basePath%>user/z/zyxllist.jsp?deviceid=<%=predeviceid%>&t=<%=System.currentTimeMillis() %>">返回</a><a class="right"  onclick="edite()">保存</a>
			</div>
			<!-- 运行参数_begin -->
			<div class="argument_box">
				<!-- 参数标题-begin -->
				<div class="argument_title">
					<p class="title">运行参数</p>
					<a  class="show"></a>
					<div class="clear"></div>
				</div>				
				<!-- 参数标题-end -->
				<!-- 参数内容_begin -->
				<div class="argument_cont_box">
					<ul class="argument_cont_ul">
						<li class="argument_cont_li"><span>设备名称：</span><input class="text" type="hidden" name="deviceid" value="<%=device.getDeviceid()%>"/><input class="text" type="text" value="<%=device.getDevicename() %>" name="devicename" maxlength="100"/><em style="color:red;"> *</em></li>
						<li class="argument_cont_li"><span>运行编号：</span><input class="text" type="text" value="<%=device.getDevicenumber()%>" name="devicenumber"/></li>
						<li class="argument_cont_li">
							<span>起点电站：</span><input class="text" name="startsubstationcode" type="hidden" value="<%=predeviceid%>"/><input class="text" readonly="readonly" type="text" value="<%=predevicename%>"/>
						</li>						
						<div class="clear"></div>
					</ul>
					<ul class="argument_cont_ul">
						<li class="argument_cont_li"><span>起点类型：</span>
							<select class="select_down" id="startdevicetype" name="startdevicetype">
								<option value="间隔">间隔</option>
								<option value="杆塔">杆塔</option>
								<option value="杆塔电缆T接头">杆塔电缆T接头</option>
								<option value="电缆小间">电缆小间</option>
							</select>
						</li>	
						<li class="argument_cont_li"><span>起点位置：</span><input class="text" type="text" name="startposition" value="<%=device.getStartpostion()%>"/><!-- <em style="color:red;"> *</em> --></li>
						<li class="argument_cont_li"><span>起点开关编号：</span><input class="text" type="text" name="startswitchnumber" value="<%=device.getStartswitchnumber()%>"/></li>					
						<div class="clear"></div>
					</ul>
					<ul class="argument_cont_ul">
						<li class="argument_cont_li"><span>所属地市：</span><input class="text" type="text" name="localcity" value="<%=device.getLocalcity()%>"/><!-- <em style="color:red;"> *</em> --></li>
						<li class="argument_cont_li"><span>电压等级：</span>
							<select class="select_down" id="voltagelevel" name="voltagelevel">
								<option value="110kv">110kv</option>
								<option value="35kv">35kv</option>
								<option value="20kv">20kv</option>
								<option value="10kv">10kv</option>
								<option value="6kv">6kv</option>
							</select>
							<!-- <em style="color:red;"> *</em> --></li>
						<li class="argument_cont_li"><span>运维单位：</span><input class="text" type="text" name="operationunit" value="<%=device.getOperationunit()%>"/><!-- <em style="color:red;"> *</em> --></li>
						<div class="clear"></div>
					</ul>
					<ul class="argument_cont_ul">
						<li class="argument_cont_li"><span>维护班组：</span><input class="text" type="text" name="maintenanceteam" value="<%=device.getMaintenanceteam()%>"/><!-- <em style="color:red;"> *</em> --></li>
						<li class="argument_cont_li" style="position:relative;"><span>投运日期：</span><input class="text" type="text"  placeholder="请选择日期" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" value="<%=PwtzUtils.date2String(device.getCommissioningdate(), "yyyy-MM-dd")%>" name="commissioningdate"/><img width="16" height="16" src="../images/select_date.jpg" style="position:absolute; top:12px;left:230px;" /><!-- <em style="color:red;"> *</em> --></li>
						<li class="argument_cont_li">
							<span>架设方式：</span>
							<select class="select_down" id="erectmode" name="erectmode">  
								<option value ="架空">架空</option>  
								<option value ="混合">混合</option>
								<option value ="电缆">电缆</option> 			
							</select>
							<!-- <em style="color:red;"> *</em> -->
						</li>
						<div class="clear"></div>
					</ul>
					<ul class="argument_cont_ul">
						<li class="argument_cont_li">
							<span>线路性质：</span>
							<select class="select_down" id="devicetype" name="devicetype">  
								<option value ="主线">主线</option>  
								<option value ="支线">支线</option>
								<option value ="分支线">分支线</option> 			
							</select>
						</li>
						<li class="argument_cont_li">
							<span>所属主线：</span>
							<select class="select_down" id="mainlinecode" name="mainlinecode"></select>
						</li>
						<li class="argument_cont_li">
							<span>上级线路：</span>
							<select class="select_down" id="prelinecode" name="prelinecode"></select>
						</li>
						<div class="clear"></div>
					</ul>
					<ul class="argument_cont_ul">
						<li class="argument_cont_li">
							<span>运行状态：</span>
							<select class="select_down" id="operationstate" name="operationstate">  
								<option value ="正常">正常</option>  
								<option value ="异常">异常</option>
								<option value ="故障">故障</option>
								<option value ="缺陷">缺陷</option> 			
							</select>
							<!-- <em style="color:red;"> *</em> -->
						</li>	
						<li class="argument_cont_li">
							<span>架空接线方式：</span>
							<select class="select_down" id="overheadlinklinemode" name="overheadlinklinemode">  
								<option value ="单幅射">单幅射</option>  
								<option value ="单联络">单联络</option>
								<option value ="多联络">多联络</option> 			
							</select>
							<!-- <em style="color:red;"> *</em> -->
						</li>
						<li class="argument_cont_li">
							<span>电缆接线方式：</span>
							<select class="select_down" id="cablelinklinemode" name="cablelinklinemode">  
								<option value ="单幅射">单幅射</option>  
								<option value ="双辐射">双辐射</option>
								<option value ="单环网" >单环网</option>  
								<option value ="双环网">双环网</option>
								<option value ="多联络">多联络</option> 			
							</select>
							<!-- <em style="color:red;"> *</em> -->
						</li>
						<div class="clear"></div>
					</ul>
					<%-- <ul class="argument_cont_ul">
						<li class="argument_cont_li">
							<span>线路总长度：</span><input class="text" type="text" name="totallinelength" value="<%=device.getTotallinelength()%>"/><!-- <em style="color:red;"> *</em> -->
						</li>
						<li class="argument_cont_li">
							<span>架空线路长度：</span><input class="text" type="text" name="overheadlinelength" value="<%=device.getOverheadlinelength()%>"/><!-- <em style="color:red;"> *</em> -->
						</li>
						<li class="argument_cont_li">
							<span>电缆线路长度：</span><input class="text" type="text" name="cablelength" value="<%=device.getCablelength()%>"/><!-- <em style="color:red;"> *</em> -->
						</li>
						<div class="clear"></div>
					</ul> --%>
					<ul class="argument_cont_ul">
						<li class="argument_cont_li">
							<span>线路色标：</span><input class="text" type="text" name="linecoloredflag" value="<%=device.getLinecoloredflag()%>"/>
						</li>
						<li class="argument_cont_li">
							<span>是否农网：</span>
							<select class="select_down" id="isruralpowernetwork" name="isruralpowernetwork">  
								<option value ="否">否</option>  
								<option value ="是">是</option> 			
							</select>
							<!-- <em style="color:red;"> *</em> -->
						</li>
						<li class="argument_cont_li">
							<span>是否代维：</span>
							<select class="select_down" id="isgenerationdimension" name="isgenerationdimension">  
								<option value ="否">否</option>  
								<option value ="是">是</option>		
							</select>
							<!-- <em style="color:red;"> *</em> -->
						</li>
						<div class="clear"></div>
					</ul>
					<ul class="argument_cont_ul">
						<li class="argument_cont_li">
							<span>重要程度：</span>
							<select class="select_down" id="importantdegree" name="importantdegree">  
								<option value ="一般">一般</option>  
								<option value ="重要">重要</option>
								<option value ="特别重要">特别重要</option> 			
							</select>
							<!-- <em style="color:red;"> *</em> -->
						</li>
						<li class="argument_cont_li">
							<span>设备状态：</span>
							<select class="select_down" id="equipmentstate" name="equipmentstate">  
								<option value ="在运">在运</option>  
								<option value ="未投运">未投运</option>
								<option value ="退役">退役</option>
								<option value ="现场留用">现场留用</option>
								<option value ="库存备用">库存备用</option>
								<option value ="待报废">待报废</option>
								<option value ="报废">报废</option>
								<option value ="正常">正常</option>
								<option value ="异常">异常</option> 			
							</select>
							<!-- <em style="color:red;"> *</em> -->
						</li>
						<li class="argument_cont_li">
							<span>地区特征：</span>
							<select class="select_down" id="regionalcharacteristics" name="regionalcharacteristics">  
								<option value ="市中心区">市中心区</option>  
								<option value ="市区">市区</option>
								<option value ="郊区">郊区</option>
								<option value ="县城">县城</option>
								<option value ="县城">农村</option>
								<option value ="牧区">牧区</option>
								<option value ="林区">林区</option>			
							</select>
							<!-- <em style="color:red;"> *</em> -->
						</li>
						<div class="clear"></div>
					</ul>
					<ul class="argument_cont_ul">
						<li class="argument_cont_li">
							<span>施工单位：</span><input class="text" type="text" name="constructionunit" value="<%=device.getConstructionunit()%>"/>
						</li>
						<li class="argument_cont_li">
							<span>监理单位：</span><input class="text" type="text" name="supervisingunit" value="<%=device.getSupervisingunit()%>"/>
						</li>
						<li class="argument_cont_li">
							<span>所属调度：</span>
							<select class="select_down" id="dispatchtype" name="dispatchtype">
								<option value="国调">国调</option>
								<option value="分中心">分中心</option>
								<option value="省调">省调</option>
								<option value="市调">市调</option>
								<option value="县调">县调</option>
							</select>
							<!-- <em style="color:red;"> *</em> -->
						</li>
						<div class="clear"></div>
					</ul>
					<ul class="argument_cont_ul">
						<li class="argument_cont_li">
							<span>调度单位：</span><input class="text" type="text" name="dispatchunit" value="<%=device.getDispatchunit()%>"/><!-- <em style="color:red;"> *</em> -->
						</li>
						<li class="argument_cont_li">
							<span>设备主人：</span><input class="text" type="text" name="equipmentowner" value="<%=device.getEquipmentowner()%>"/><!-- <em style="color:red;"> *</em> -->
						</li>
						<div class="clear"></div>
					</ul>
				</div>
				<!-- 参数内容_end -->
			</div>
			<!-- 运行参数_end -->

			<!-- 资产参数_begin -->
			<div class="argument_box">
				<!-- 参数标题-begin -->
				<div class="argument_title">
					<p class="title">资产参数</p>
					<a  class="show"></a>
					<div class="clear"></div>
				</div>				
				<!-- 参数标题-end -->
				<!-- 参数内容_begin -->
				<div class="argument_cont_box">
					<ul class="argument_cont_ul">
						<li class="argument_cont_li">
							<span>资产性质：</span>
							<select class="select_down" id="assetsnature" name="assetsnature">  
								<option value ="用户">用户</option>  
								<option value ="公司">公司</option>
								<option value ="子公司">子公司</option>
								<option value ="省(直辖市、自治区)">省(直辖市、自治区)</option>				
							</select>
							<!-- <em style="color:red;"> *</em> -->
						</li>
						<li class="argument_cont_li"><span>资产单位：</span><input class="text" type="text" name="assetunit" value="<%=device.getAssetunit()%>"/></li>
						<li class="argument_cont_li"><span>资产编号：</span><input class="text" type="text" name="assetnumber" value="<%=device.getAssetnumber()%>"/><!-- <em style="color:red;"> *</em> --></li>
						<div class="clear"></div>
					</ul>
					<ul class="argument_cont_ul">
						<li class="argument_cont_li"><span>工程编号：</span><input class="text" type="text" name="projectnumber" value="<%=device.getProjectnumber()%>"/></li>
						<li class="argument_cont_li"><span>工程名称：</span><input class="text" type="text" name="projectname" value="<%=device.getProjectname()%>"/></li>	
						<li class="argument_cont_li">
							<span>设备添加方式：</span>
							<select class="select_down" id="equipmentadded" name="equipmentadded">  
								<option value ="基本建设">基本建设</option>  
								<option value ="技术改造">技术改造</option>
								<option value ="投资者投入">投资者投入</option>
								<option value ="融资租入">融资租入</option>
								<option value ="债务重组取得">债务重组取得</option>
								<option value ="接受捐赠">接受捐赠</option>
								<option value ="无偿调入">无偿调入</option>
								<option value ="盘盈">盘盈</option>
								<option value ="其它">其它</option>				
							</select>
						</li>
						<div class="clear"></div>
					</ul>					
				</div>
				<!-- 参数内容_end -->
			</div>
			<!-- 资产参数_end -->
		</div>	
		<!-- 柱上变压器_end -->		
	</div>
	</form>
	<%}else{ %>
	<h4>设备id错误</h4>
	<%} %>
	<!-- 右侧内容_end -->
	<div class="clear"></div><!-- 清除左右浮动 -->
	</div>
	<!-- main_end -->
	<%@ include file="/user/foot.jsp"%>
</body>
</html>